home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_313
/
uucp
/
uucp1.lzh
/
src
/
lib
/
string.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-10
|
589b
|
44 lines
/*
* STRING.C
*
* (C) Copyright 1989-1990 by Matthew Dillon, All Rights Reserved.
*
*/
strcmpi(s, d)
char *s;
char *d;
{
short c1, c2;
for (;;) {
c1 = *s++;
c2 = *d++;
if (c1 == 0 || c2 == 0)
return(c1 || c2); /* 0= both are 0 */
if (((c1 ^ c2) | 0x20) != 0x20)
return(1);
}
return(0);
}
strncmpi(s, d, n)
char *s;
char *d;
short n;
{
short c1, c2;
while (n--) {
c1 = *s++;
c2 = *d++;
if (c1 == 0 || c2 == 0)
return(c1 || c2); /* 0= both are 0 */
if (((c1 ^ c2) | 0x20) != 0x20)
return(1);
}
return(0);
}